<?php
/**
 *
* This file is part of Webappkit, a packages system for PHP web apps
* @link http://webappkit.net
* @package dj
* @subpackage urls
* @author J.Ducastel <nospam0@ducastel.name>
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*/

class DjRoute {

    /**
     * constructor
     * @param string $name
     * @param string $pattern regex
     * @param string $view
     * @param array $args
     */
    public function __construct($name, $pattern, $view, $args=array()) {
        $this->name=$name;
        $this->pattern=$pattern;
        $this->view=$view;
        $this->args=$args;
    }

    /**
     * @var string view id
     */
    public $name;

    /**
     * @var string view to serve kit.class.method
     */
    public $view;

    /**
     * @var string regex used to define route
     */
    public $pattern;

    /**
     * @var array captured pattern matches
     */
    public $args;
}